<include file="public@header" />
</head>
<body>
<div class="wrap">
  <ul class="nav nav-tabs">
    <li class="active"><a >列表</a></li>
    <li><a href="{:url('agreement/add')}">添加</a></li>
  </ul>
  <div class="wrap js-check-wrap">
    <ul class="nav nav-tabs slider">
      <volist name="countryData" id="vo">
        <li <if condition="$vo.id eq $langId"> class="active" </if> ><a data-toggle="tab" data-id="{$vo.id}">{$vo.name}</a></li>
      </volist>
    </ul>
  </div>
  <div class="js-ajax-form">
    <table class="table table-hover table-bordered">
      <thead>
      <tr>
        <th>ID</th>
        <th>协议标题</th>
        <th>协议类型</th>
        <th>添加时间</th>
        <th>最后修改时间</th>
        <th align="center">{:lang('ACTIONS')}</th>
      </tr>
      </thead>
      <tbody>
      <foreach name="list" item="vo">
        <tr>
          <td>{$vo['id']}</td>
          <td>{$vo['title']}</td>
          <td>{$vo['typeName']}</td>
          <td>{$vo['create_time']}</td>
          <td>{$vo['update_time']}</td>
          <td>
            <a class="btn btn-xs btn-primary" href='{:url("agreement/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
            <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('agreement/del',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
          </td>
        </tr>
      </foreach>
      </tbody>
    </table>
    <div class="pagination">{$page}</div>
  </div>
</div>

<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
  (function(){

    $('li a').click(function () {
      window.location = '{:url("/admin/agreement/index")}?langId=' + $(this).data('id');
    });

  })()
</script>
</body>
</html>